Connecting via PHP
The following example shows how to connect to the SQL Server via PHP.
<?php
$serverName = "mssql-xxxx-0.cloudclusters.net,xxxx";
$connectionInfo = array( "Database"=>"dbname", "UID"=>"dbuser", "PWD"=>"dbpass");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>